<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>晒单</title>
    <link href="/resource/admin/css/common.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/resource/admin/js/jquery.js"></script>
    <script type="text/javascript" src="/resource/admin/js/jquery.tools.js"></script>
    <script type="text/javascript" src="/resource/admin/js/jquery.validate.js"></script>
    <script type="text/javascript" src="/resource/admin/editor/kindeditor.js"></script>
    <script type="text/javascript" src="/resource/admin/js/common.js"></script>
    <script type="text/javascript" src="/resource/admin/js/input.js"></script>
    <script type="text/javascript" src="/resource/admin/datePicker/WdatePicker.js"></script>
    <script type="text/javascript">
        $().ready(function() {
            var $inputForm = $("#inputForm");
           [@flash_message /]
        });
    </script>
</head>
<body>
<div class="path">
    <a href="${base}/common/index">首页</a> &raquo;晒单
</div>
[#if dbShare??]
<form id="inputForm" action="update" method="post" class="required-form" enctype="multipart/form-data"  onsubmit="return validateForm(this)">
    <input type="hidden" name="id" value="${dbShare.id}"/>
    <input type="hidden" name="dbTimesId" value="${dbTimes.id}"/>
    <input type="hidden" name="memberId" value="${member.id}"/>
    <table class="input">
        <tr>
            <th>
                <span class="requiredField">*</span>产品名称
            </th>
            <td>
                 ${dbShare.productName}
                 <input type="hidden" name="productId" value="${dbShare.productId}"/>
                 <input type="hidden" name="productName" value="${dbShare.productName}"/>
            </td>
        </tr>
        <tr>
            <th>
                <span class="requiredField">*</span>参与次数
            </th>
            <td>
                ${dbShare.count}
                <input type="hidden" name="count" value="${dbShare.count}"/>
            </td>
        </tr>
        <tr>
            <th>
                <span class="requiredField">*</span>晒单主题
            </th>
            <td>
                <input type="text" name="title" value="${dbShare.title}" class="text"/>
            </td>
        </tr>
        <tr>
            <th>
                <span class="requiredField">*</span>晒单内容
            </th>
            <td>
                <input type="text" name="content" style="width: 200px;" value="${dbShare.content}" class="text"/>
            </td>
        </tr>
        <tr>
            <th>
                <span class="requiredField">*</span>夺宝期
            </th>
            <td>
                ${dbTimes.timesNo},${dbTimes.quantity}
            </td>
        </tr>
        <tr>
            <th>
                <span class="requiredField">*</span>中奖用户
            </th>
            <td>
                ${dbTimes.lotteryMobile}
            </td>
        </tr>
        <tr>
            <th>
                <span class="requiredField">*</span>中奖用户
            </th>
            <td>
                <select name="isShow" class="text">
                    <option value="1" [#if dbShare.isShow==true]selected=selected[/#if]>显示</option>
                    <option value="0" [#if dbShare.isShow==false]selected=selected[/#if]>不显示</option>
                </select>
            </td>
        </tr>
        <tr>
            <th>
                <span class="requiredField">*</span>晒单图片1
            </th>
            <td>
                <input type="file" name="dbShareImages[0].file" class="text" value=""/>
                [#if dbShare.dbShareImages.size()>0]
                    <a target="_blank" href="${dbShare.dbShareImages[0].large}">预览</a>
                [/#if]
            </td>
        </tr>
        <tr>
            <th>
                <span class="requiredField">*</span>晒单图片2
            </th>
            <td>
                <input type="file" name="dbShareImages[1].file" class="text" value=""/>
                [#if dbShare.dbShareImages.size()>1]
                    <a target="_blank" href="${dbShare.dbShareImages[1].large}">预览</a>
                [/#if]
            </td>
        </tr>
        <tr>
            <th>
                <span class="requiredField">*</span>晒单图片3
            </th>
            <td>
                <input type="file" name="dbShareImages[2].file" class="text" value=""/>
                [#if dbShare.dbShareImages.size()>2]
                    <a href="${dbShare.dbShareImages[2].large}">预览</a>
                [/#if]
            </td>
        </tr>
        <tr>
            <th>
                <span class="requiredField">*</span>晒单图片4
            </th>
            <td>
                <input type="file" name="dbShareImages[3].file" class="text" value=""/>
                [#if dbShare.dbShareImages.size()>3]
                    <a target="_blank" href="${dbShare.dbShareImages[3].large}">预览</a>
                [/#if]
            </td>
        </tr>
        <tr>
            <th>
                <span class="requiredField">*</span>晒单图片5
            </th>
            <td>
                <input type="file" name="dbShareImages[4].file" class="text" value=""/>
                [#if dbShare.dbShareImages.size()>4]
                    <a target="_blank" href="${dbShare.dbShareImages[4].large}">预览</a>
                [/#if]
            </td>
        </tr>
        <tr>
            <th>
                &nbsp;
            </th>
            <td>
                <input type="submit" class="button" value="提交" />
                <input type="button" class="button" value="返回" onclick="location.href='list'" />
            </td>
        </tr>
    </table>
</form>
[#else]
<form id="inputForm" action="update" method="post" class="required-form" enctype="multipart/form-data"  onsubmit="return validateForm(this)">
    <input type="hidden" name="dbTimesId" value="${dbTimes.id}"/>
    <input type="hidden" name="memberId" value="${member.id}"/>
    <input type="hidden" name="dbOrderId" value="${dbOrder.id}"/>
    <table class="input">
        <tr>
            <th>
                <span class="requiredField">*</span>产品名称
            </th>
            <td>
                ${dbOrder.name}
            </td>
        </tr>
        <tr>
            <th>
                <span class="requiredField">*</span>参与次数
            </th>
            <td>
                ${dbOrder.quantity}
                <input type="hidden" name="count" value="${dbOrder.quantity}"/>
            </td>
        </tr>
        <tr>
            <th>
                <span class="requiredField">*</span>晒单主题
            </th>
            <td>
                <input type="text" name="title" value="" class="text"/>
            </td>
        </tr>
        <tr>
            <th>
                <span class="requiredField">*</span>晒单内容
            </th>
            <td>
                <input type="text" name="content" style="width: 300px;" value="" class="text"/>
            </td>
        </tr>
        <tr>
            <th>
                <span class="requiredField">*</span>夺宝期
            </th>
            <td>
             ${dbTimes.timesNo},${dbTimes.quantity}
            </td>
        </tr>
        <tr>
            <th>
                <span class="requiredField">*</span>中奖用户
            </th>
            <td>
            ${dbTimes.lotteryMobile}
            </td>
        </tr>
        <tr>
            <th>
                <span class="requiredField">*</span>中奖用户
            </th>
            <td>
                <select name="isShow" class="text">
                    <option value="1">显示</option>
                    <option value="0">不显示</option>
                </select>
            </td>
        </tr>
        <tr>
            <th>
                <span class="requiredField">*</span>晒单图片1
            </th>
            <td>
                <input type="file" name="dbShareImages[0].file" class="text" value=""/>
            </td>
        </tr>
        <tr>
            <th>
                <span class="requiredField">*</span>晒单图片2
            </th>
            <td>
                <input type="file" name="dbShareImages[1].file" class="text" value=""/>
            </td>
        </tr>
        <tr>
            <th>
                <span class="requiredField">*</span>晒单图片3
            </th>
            <td>
                <input type="file" name="dbShareImages[2].file" class="text" value=""/>
            </td>
        </tr>
        <tr>
            <th>
                <span class="requiredField">*</span>晒单图片4
            </th>
            <td>
                <input type="file" name="dbShareImages[3].file" class="text" value=""/>
            </td>
        </tr>
        <tr>
            <th>
                <span class="requiredField">*</span>晒单图片5
            </th>
            <td>
                <input type="file" name="dbShareImages[4].file" class="text" value=""/>
            </td>
        </tr>
        <tr>
            <th>
                &nbsp;
            </th>
            <td>
                <input type="submit" class="button" value="提交" />
                <input type="button" class="button" value="返回" onclick="location.href='list'" />
            </td>
        </tr>
    </table>
</form>
[/#if]
</body>
</html>